Next do 7-9:
Please note that in their example: a one inch thick board, 8 feet long, by 12 inches wide is how many board feet. One board foot = 12 inches x 12 inches x 1 inch.
So, you have to figure out the volume of the piece of wood and divide it by 1 board foot:
sglLength = 8 * 12 ' to convert to inches
sglWidth = 12
sglThick = 1
so, the number of board feet is: sglLength * sglWidth * sglThick / (12 * 12* 1) **remember, sglLength must be in inches! Next, redo 7-7, but use user defined subs passing a reference parameter.
In chapter 8, try 1, 6, 9, 11 (use user defined subs and/or functions). If you are interested in business functions, substitute some of those for the ones I listed.
We will then learn to make user defined subs for graphics functions (chapter 10). Unfortunately, we won't be able to do graphics like in the textbook because VBA doesn't support such functions! May have to do some Scratch instead!
We will focus on VBA Game Programming after Chapter 8. Here is a tutorial
Do the metric conversion first: 7-7 (use functions)
Here are some other examples for functions:
Next do 7-9:
Please note that in their example: a one inch thick board, 8 feet long, by 12 inches wide is how many board feet.
One board foot = 12 inches x 12 inches x 1 inch.
So, you have to figure out the volume of the piece of wood and divide it by 1 board foot:
sglLength = 8 * 12 ' to convert to inches
sglWidth = 12
sglThick = 1
so, the number of board feet is: sglLength * sglWidth * sglThick / (12 * 12* 1)
**remember, sglLength must be in inches!
Next, redo 7-7, but use user defined subs passing a reference parameter.
In chapter 8, try 1, 6, 9, 11 (use user defined subs and/or functions). If you are interested in business functions, substitute some of those for the ones I listed.
We will then learn to make user defined subs for graphics functions (chapter 10). Unfortunately, we won't be able to do graphics like in the textbook because VBA doesn't support such functions! May have to do some Scratch instead!
We will focus on VBA Game Programming after Chapter 8.
Here is a tutorial
BEFORE YOU BEGIN, ADD THE DEVELOPER TAB TO YOUR EXCEL 2010 RIBBON. Select File, Option from Excel and click on Customize Ribbon:
Once you do this, you can insert the Command Button from the Developer Tab: